<?php
$CI =& get_instance();
$sBasePath = public_base_url().'js/fckeditor/' ;
?>
<?php 
	$t1 = unserialize($ed['t1']);
?>
<h2>Template Text (1 Column 1 Row)</h2>
<div class="content-inner">
	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="form-table">
	  <tr>
		<th nowrap="nowrap" class="label">Template Name</th>
		<td class=""><input type="text" name="item_name" class="input-text" value="<?=$ed['name']?>"></td>
	  </tr>
	  <tr>
		<th nowrap="nowrap" class="label">Title</th>
		<td class=""><input type="text" name="item_title" class="input-text" value="<?=$ed['title']?>"></td>
	  </tr>
	  <tr>
		<th nowrap="nowrap" class="label">Roles</th>
		<td class="">
			<select name="t1_roles[]" multiple="true" size="5">
				<?php foreach($roles as $item):?>
				<option value="<?=$item['id']?>" <?=array_search($item['id'], $t1['roles']) ? "selected='true'" : ""?>><?=$item['name']?></option>
				<?php endforeach;?>
			</select>
		</td>
	  </tr>
	  <tr>
		<th class="label">Content</th>
		<td>
			<?=$this->ckeditor->editor("t1_content", $t1['content'], array("baseHref" => site_url()));?>
		</td>
	  </tr>
	  <tr>
		<td>&nbsp;</td>
		<td>
		  <input type="hidden" name="id" value="<?=$ed['id']?>" />
		  <input type="hidden" name="item_temp" value="<?=$template_type?>" />
		  <input type="hidden" name="item_main" value="<?=$nav['id']?>" />
		  <input name="Submit" type="submit" class="ins" value="Save" />
		</td>
	  </tr>
	</table>
</div>
